import GlobalView from '@/components/layout/global-view.vue'

export const RouteView = {
  name: 'RouteView',
  render: (h: any) => h('router-view')
}

/**
 * 基础路由
 * @type { *[] }
 */
export const constantRouterMap = [
  {
    path: '/',
    redirect: '/dashboard',
    component: GlobalView,
    children: [
      {
        path: 'dashboard',
        name: 'dashboard',
        component: () => import('@/views/Dashboard.vue'),
        meta: {
          icon: 'home',
          title: '首页'
        }
      },
      {
        path: 'form',
        name: 'form',
        component: RouteView,
        meta: {
          icon: 'form',
          title: '表单'
        },
        children: [
          {
            path: 'base',
            name: 'form-Base',
            component: () => import('@/views/form/Base.vue'),
            meta: {
              icon: '',
              title: '基础表单'
            }
          }
        ]
      },
      {
        path: 'list',
        name: 'list',
        component: RouteView,
        meta: {
          icon: 'unordered-list',
          title: '列表'
        },
        children: [
          {
            path: 'TableList',
            name: 'list-TableList',
            component: () => import('@/views/list/TableList.vue'),
            meta: {
              icon: '',
              title: '基础列表'
            }
          }
        ]
      }
    ]
  }
]
